package top.ochiamalu.aioj.enums;

import lombok.Getter;

/**
 * 修改电话列举
 *
 * @author ochiamalu
 * @date 2025/04/09
 */
@Getter
public enum ModifyPhoneEnum {
    UNBIND(0, "解绑"),
    BIND(1, "绑定");

    private final Integer type;
    private final String description;

    ModifyPhoneEnum(Integer type, String description) {
        this.type = type;
        this.description = description;
    }

    public static ModifyPhoneEnum getEnumByType(Integer type) {
        for (ModifyPhoneEnum modifyPhoneEnum : ModifyPhoneEnum.values()) {
            if (modifyPhoneEnum.getType().equals(type)) {
                return modifyPhoneEnum;
            }
        }
        return null;
    }
}
